attempting to fix nil class errors