fix bugs in logging selected inputs