Fixed rule file loading bugs