Fixed method call to self._write_message