added support for custom handlers due a debian bug, take 2