Fixed SQL Deleting Bug