Fix possible error. Optimization