Updated code fix as per  Agoston's collab comments