fixed bug in rendering blocks