fix a couple of null exception for selection mode

should be good shape now