fixed glitches in selection program