fix small errors failing in Firefox