fix different matrix drawing