added lock for nagbar