fix getPic logic