Fixed print calls for Python3 compatibility.