* removed some test debug messages.
Fixed two possible NPE.