Fixed script for Firefox