Fixed a bug were the listener wouldn't be added correctly