Fixed listener method and server setup