fixes from thachtunganh