Fix error in the listener with wrong $db functions call (typos).