Fixed compatibility problems with OMS. Works with Sage 5.10.