Fix rect drawing