Fixed some query