Fixing bugs found by the closure compiler.