small changes for compatibility with core's latest changes