Fixed a bug in latest commit