Changes from Quarx/CM, missded some in previous commit