few simple changes to test and core error handling