This should work better. It could get messy if it fails on a webpage, but oh well.