fixed bug with undefined index