fixed xml encoding bug #24