Fix IllegalArgumentException: 1 > 0