Fixed while and do-while CS checks