make API future proof, check flag value

Signed-off-by: Hagen Paul Pfeifer <hagen@jauu.net>