Added class restriction to connection