Fixed autoresizing issue for custom views