Fixed some sql-queries and AJAX calls.
With Mr. Mohammed