getLinks fix

Stores all links into the the db properly now.