This seems a bit magic to me, but I can live with it...