fixed inner table on edit and create, sorted departments