Python script fix