Fixes invalid header error on activate or reactivate