fix handler creation