bug with i++