Fix from Trond for deprecation