Fixed bug with dirty rectangle.
Changed dirty rect to [x,y,w,h].