fix reversed chain