fixed bug with blocks