Fixed a bug of timbering