added guard against zero-length assets