fix home variable replacement