Fix #988: top/bottom error messages