fixed bug in sp500