fixed the links when database changes made