bugfix for running python codes