fixing active route attribute logic