Fix for foldLeft serializable issue

closes #492