JBTM-1313 more error checking