rename const and fixed if