Fixes a bug that was sending messages on every response