bugfix renew code not getting called due to logic error.