Changed connected callback to match current lib version