Made the listener use the configured type field name

Hardcoding the name in it makes the type option useless.