fixed bug in custom post types