fixed bug in Handler.py