Fixed flattenImage so all the graphs except 3mer are working