fix preview photo bug