Fix error with undefined scale and clone function.