Little bug fixes