Improved replacement on resources files.