fixed dbconnect to work for any pages