Fixed erroneously sorting multiple images when using keyboard