bug fix for firefox - thanks @tsatse