Add code that went missing after merge of #15