Fixed problem with a type not fulfilling an interface. Fixed bug whereby a nil output was being written to.