added some redundancies for connection stabilization (hopefully)