small stability fixes