Cristian: fixed XHR calls