fixed the 'edit by id' feature