bug fixes; work on cpython test