fixed small bug in previous commit #666