more bug fixes (reverting some other fixes) to createPath in views.py