Fix flag panic

fixes #7