Fixed Bug with editing after a sort