Fixing class warnings

The compiler gets it right, but xcode yields warnings. This fixes the issue.