fixed invalid SQL for navdetails