patch for issue #8

fixes redirect problem with issue #8