fixed invalid selection being backwards