fixed error handling in price ratio