KER-258: Fixed bugs met during the integration tests and registered listener automatically