Fixed and tidied error messages.