Some fixes in various files