write_view_definition fix

write_view_definition fix