fixing syntax bugs