fixes navbar button functionality