Bug fixes on Lang class