change message stuff for better portability