minor modifications for firefox-compatibility