Added next function from upstream so screenmanager won't crash with python Py2K.