onslaveclose() is not defined.