fixed some photometry bugs