small bug fixes & improvements