fixed a bug that caused the script to crash on no connection