Fixed infinite view loop