fixed small bug

by small I mean it would crash if you encountered it...