Fix bug that the sample files are not correctly installed under specific situation.