Fix unexpected JS loop in dropdown. Fixes #34