fixed some bugs, get_block and truncate now seem to work