fixed compatibility issue with WordPress 4.0 beta4