fixed some compilation problems
1004.13