Bug fixed in doWork()