Checked all errors(undefined indexes) and resolved