fixed small bugs in new atomic... support for SharedPtr(only seen on unix)