Bugfix and minor improvments

Fixed bug where the final stitch was appended in the wrong direction