fixes two warnings about shadowing local variables