Fixed mysql result bug