Fix OPTIONS regression

This PR fixes the issue discussed in #573. Thanks to @karlfreeman for the tests.