Improve pause resume stop task