fixed toggleView Bug