Made compatible with WordPress 3.7