fix trip bug