Fixed incorrect logic with whistle. Fixes #46.