Cleared IntelliJ warnings by taking its advice.