Fixed a bug in last commit