Bug fix for edit form