fixed issue when editing