this didn't work and causes infinite loops on Mac OS X.