fixed small bug in one of the utils functions