fix: getAccount error causes undefined object error

previously we would try to read account, which is undefined if
there is an error