Fix bug where security listener was not added correctly (#3).