Fix applying and removing views