fixed bug with drawing cell borders