Some fixes to source