fix coinflip bug