fixed check of worker and stop callbacks