Adapted to well-core 0.5.1