Fixed a typo that ruined the entire function