fixing some handler issues