fixed small bugs with conditional get code