Fixed a bug related to previous commit