added flush() call in copy(PImage, ...)