some bug fixes. pub/sub sort of working