fixes for disconnect behavior