Removed unnecessary check from getflags