images reference on change location not working correctly