Fixes an argument missing for key generation + a few other minor changes