Removed NoneType references for PY3 compatibility