Add partial support for heartbeats in wait_frame