fixed flag value getting cut off