fixed python syntax warning