fix bug in realtime.sh