Fixed syntax and other errors