Python weird error fixed