Fix for query size, using memory size instead of number of characters