Fixed problems with links being stored out of proper order.