optimize by only fetching when necessary

Signed-off-by: Greg Dietsche <Gregory.Dietsche@cuw.edu>