Resolve inspection warnings

By IntelliJ code inspection