Fixed some Select Query issue