fixed incorrect method of getting path to image