Fixed the substitution of HOME.