Update APISession.java

refactorized CmdRunner.release() handling