Fixed sorting bug. Fixed deleting bug.