small tweak to attachment detection