Fixed code for mozilla