Change call to connect variable to happen in construct of page