Re-added a bit of code needed for #96.