Small changes to onCommand