fixed to be compatible for Wordpress 3.5.2