Fixed printf; changed %i to %d for integer representation.