Fixed Navigation and added assertions in the function itself