Fix hom_w calculation