fixed handling of active route changes. github issue #56 and issue #58