Fixes to main function in the binary