fixed bugs in purchase and view panel