Fixed errors with selection null pointers