added code to remove a datatable if one was made during registration by error