Bug fix for post types