Fix couple type error issues that show up in firefox