bug fix, style flag were not updated properly for some styles