fix blank messages with ajax queries