Fixed a bug from last commit