Fixing JS 'fun' macro