Variable '$messages' was overwritten.