BUG. Fixed problems with picture orientation