Fixed bugs with syntax and timing