unit tests for shortcut, message iteration, fix bug in message iteration