move flags before options