Fixed introduced compile errors and intellij warnings.