now works correcly even if no user handler is registered yet