SQL Queries bug solved.