Should fix NPE on commands. Not sure if will work.

Programmed without IDE, so may be syntactically incorrect. If jenkins
compiles it, it should work.