fix the missing dispose calls in NullImageTest method.