Add stricter array check
Update spec for ajax call
Add spec for download error