Sync with latest develop

And minor fixes