Fix for not-an-array error.