Made addPassToBack thread safe.

Also fixed unit tests to conform to the new 'pass' method.