minor bug fix that caused an assertion to fail