fixed some syntax bugs