Fixed query encoded text null problem