More fixes to make it work under Dancer2