fixes #4 - flag will now reset