Compatibility fix for WP 4.0