2 NPE fixes: messages are null when returning with no result; location logging criteria is illegal.