some fixes for displaying photos