Fix weird IllegalArgumentException