Left some curly brackets on accident - fixed.