fixing some Firefox related bugs