added destroy_image interface.
typo fix.
fixed a deadlock.
removed a debug print.