fixed accessing static var in non static context

Fixed the error, where the class was trying to access static variables in non static context.