Fix to prevent use with attachment post type