Implemented leaving of train.