performance fixes and discount fix