Small fixes in the code