Some fixes to the code