Fix stuff for pyramid 1.2