attempting fix of connection left open on photos api