couple of bugfixes identified while importing from VB