fix bugs , compatibale with firefox