resolve some typing errors