added flag fallback, if flag doesn't exist