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