fixed the handler issues