This should fix the images race condition and also slightly reduce computation.
Merge pull request #100 from eparsons/fixImageRaceCondition

This should fix the images race condition and also slightly reduce computation time.