Bug with getSortedViews solved