Pulled/fixed changes from Trieng.