flags return; some fixes