bug fixes, still may have unicode problems