fix the runtime error that got introduced with Brian's changes