fix REPL
Merge branch 'master' into master_copy2