Fixed issue with syntaxtree encoding