Add more test, fix record sizing bug