Fixes errors in edit view