Fix syntax error, and correct stop implementation
Fix syntax error