fix error on view page