Fixed js fun snippet