clone command + fix various bugs