fixed a lot of merge/regexing problems #37