Remove foreground status on completion and error