Add error strict validation. Fix index errors