Fix bug for multipart detection