Fixed a bug when the type uses underscore. It was using the strtolower to set the type, but since it used the Inflector::camelize to set the relation, it need to use the Inflector::underscode to get the initial value.