Fix functions with deleted image