fix returned messages to print correctly