fixes bug for shifting photos