self.class errors from moving code around fixed.