couple of things related to errors

Including #169