'fixed scanner not closed and int to integer conversion'