fix: empty array were not handled