Fixed the issue with naming the unique key for stocks. All functions working perfectly.