some additions to message handler, also preventing ProcedureActivity
from sleeping