Fixed cut and paste bug with int generator. Added test