Fixed connect in submit and index.