Fixed some issues with data level and flags