Added curly braces to if statements(5).