fix some ridiculous bugs