Fixes #504 without nuking previous changes that snuck in ;)