issue with celery background task. #515 resolved

#515  
I think, there was a small bug for this issue. I have resolved it. Please have a look.