Better fix for comparing classes + Use global references to jclass instances used on a global scope.