Fix slash-forwarding bug, add logging.