Fixed bugs in swap form for origin js and destinations js