Fixed compatibility code