Fixed main python script issue