fixed pretty print for simple query