Doesn't seem like you need this outer if block no?