Added INACTIVE mode + bugfix.