When getting frustrated by code that should work, remember to look at the error log, it may help you avoid losing an hour and a half (or more) of your life to a simple problem.
Trust me on this.
I lead teams at the intersection of strategy and design. Autodidact. Polymath. Barbecue acolyte. I start fires (the good kind).