fix: check detached state in .visible. fixes #58.