fixed bug in external gallery photographs