fix global callable in py3 < 3.2
fix user input for db update in py2