bugfixes with logging and recipient code