Added dock fleeing code