small code changes for getting images to work