fix error when is not array var post_types