solution for #402: properly compute array types