fixes and improvements

- Added a little delay before returning a response
- Always send a control message before the real message
- Checks that the data has been sent before continue