fixed bug in deleting subject function with empty subject