fixed logging
fixed NPE in test