Fixed error with random image