Fixed not checking syntax before executing