bugfix for random handle.