Doing that detection a better way.