bug fix to PostMsg