Fixed bug in previous 2 commits