fixed unnecessary get(i) calls;