Fix for heartbeat issue in iOS