Fixes for https://github.com/intridea/grape/issues/493

See https://github.com/intridea/grape/issues/493.