Porting to MagentoDB fixes