Fix corner cases when unzipping