fixed sql query to check for duplicate tables
Added Organization events