Fix bug creating items with invalid main_tag