random code fixes