Fix warnings

This pull request fixes all build warnings.