Add some minor changes to the listener to make the error message more clean!