bugfix when assigning image url to var