Clean up
Improved the solution introduced in #074f4d0.