Fixed some code that missed because of using 'git reset --hard'