private function fixMessages($messages, $name, $realName, $subName)
    {
        $toRemove = null;

        foreach ($messages as $messageRule => $message) {
            if (strpos($messageRule, $name.'.') !== false) {
                $toRemove = $messageRule;
                $messageRule = substr($messageRule, strpos($messageRule, '.') + 1);

                $messages[$realName.'_'.$subName.'.'.$messageRule] = $message;
            }
        }

        if (isset($toRemove)) {
            $this->messageKey = $toRemove;
        }

        return $messages;
    }