Only bind popup if def. Fixes #465