fix a couple bug in firefox