Fixed EDIT functionality.