Fix custom_fields on post edition and creation