Heartbeat fix.
Added close operation.