fix to syntax bugs