Hack until I have time to rewrite it.