fixed null selection crashes with flexpath.