fixed a ptree exception