Changed order for xhr