Much better fix for the error. Still not perfect as it's hard to catch warnings if the
command/listener takes more than one argument but only some are supplied.