Fixed view API bugs