Fixed some bugs with SQL
Made Tracking possible again
Fixed metadata not working when multiple results were found