fixed another race condition. be careful with barriers
fixed warning; style
fixed critical typo
enhanced exception safety