Fix flags to be pointers