Couple small bug fixes