Added deadline switch and worked around yet another bug in Paper