Fixed wrong value of flags in some subareas