Minor fixes in the code