Fixed a bug which is caused in the previous merge.