Fixed bug where global $language variable was overwritten.