Fixed problem with connect class