Few minor bug fixes