Implementing this in one of my projects and just realized that I forgot to 'var' the 'current' variable :)