fix bug in pop up view controller