Fixed the selection bug and improved SelectionResult