Massive patch to catch up to ucw_dev