fixed broken prepare_vmd_connection