fixed read flag drop; compile not tested