Fixes if-statement

Generator would not work properly when else statement was missing.