more fixes to handler