fixed major bugs in view testing