moved plugin functionality to the end. (bones#666)