make thrift recipe more robust