Fixed various syntax bugs