fix rest blocks bug