Fixed displayed errors in some cases