fixed some bugs in navigation