Migration and photo.js bug fixes