Fixed the background tag writing and notification issues