fixed setBlock problems and tree problem