Update stop function for #466
Merge pull request #93 from nguyenxuanluong-luvina/master

#466 - Update  stop function for