CLI python function issue print fix

This fix worked for my development and production environment. Have a look and Decide if this works.

## Tested 

* Made several tests in dev/production environment Big improvement!