Fixed python issues