fixed ifstmt bug where when ELSE absent the code broke