need to deal with patches not completely inside a partition