minor stability fixes