flags seems to be the problem