Add more warnings.
Fix bug with statistics.