Fixed TOS implementation.