improving reliability of command listeners