Missing end

Fixing two syntax errors to two if/else statements