fixed switch views button to work with the new json