Some fixes for running 160bits, able to run tests but not working correctly