Fix bug that caused certain selectors to throw exceptions in the selection process