fix https://github.com/RubyLouvre/avalon/issues/198 bug