added dallying and fixed error message sending