Added stop function.