added color averaging during merge
fixed frame id