Reverted some changes that should not have been part of the merge from Midiman.