Fixes ERROR: Uncaught ReferenceError: current is not defined