fixed multiple calls and removed cruft.