flatten correction