Fixed problem with FF by using JS