Fixed block freeing code