cleanup of flags
windows does not like cast from double to enum