added missing {} to if statement that had two lines belonging to it