Finally, a solution that works.