Fixed if command in index view