Fixed some bugs that were introduced in https://github.com/Reverp/Toxy/commit/de11278e7436e4fe70824324583d5a38c8172013