Fixes few crashes in typechecker. Removes extra arg in requirejs calls