Bug: fixed NPE if there is only one picture available