Fixed a bug introduced by the last commmit