Fix home path calculation