fix bugs on handling non-ruby module