fix stupid remnants and bugs