Silly me forgot to add "then" at the end of if-statements.