Fix AIRAVATA-1382 (stdout is returning a warning) and AIRAVATA-1372
(ArithmeticException: / by zero)