added diagnostic msg. fixed typo