Fixes a bug when fn is not defined
Merge commit '9cef23f' into develop

* commit '9cef23f':
  Fixes a bug when fn is not defined