fixing to current ol api