Make Refinery render safer

Closes #1139