fixed messages class to use environment new lines