bug fixes and validation issues

bug fixes and validation issues