Fixed bug in on_message callback.
Fixed bug in DESTROY subroutine.