Fix data insertion, and remove redunant redirect mess.