Fixed blank message issue and fixed tests