fixed bug in photometry pipeline