fixing resize variables