Fixed bugs in unit tests for Freelist