fix segfault
Merge branch 'master' into trajopt-alex