Bug fix for handlers. Fixes #1.