Fix an issue with ajax responses