fixed crashing issues in navigation