Fixed warnings

This fixes some warnings in newer GHC versions.