Small tweaks to update compatibility with newer versions of gems.