ADDED: Random unit test, fixed