Bug fixes in moments and update to str()