Fix ajax request and photo store