fixed post type register and flushing