fixed problem with data getting lost if selecting category or type in edit view