Added fix to images method so it runs in Firefox