Fix calling the same onCommand multiple times