Fixes for connection handler