fixed bugs in navigation