more robust selected button functionality
fixes #72