perhaps the bug is caused by encoding?