prepare statements bug fixed
some changes