Fixed problem with storing the selection