Added missing var keywords, semicolon, and radix parameter