Added changes to test.c, see changelog for details