fixed bug where adding link wouldn't save to database