removed references to non-existens images in res
add flag