updated some constants and fixed heartbeat