fixed logic for home page rendering