Minor small fixes.
Added lock around notification.