Bugfix in make_melody