some fixes and clone