small bug fixes