fixed compiler warning about unused var