fix offset and connection