bug fixes in copytask.py