add compatibility for firefox