upd: some bugfixes