Adapt to OL3 changes