Fix possible segfault ; add function.
Merge branch 'master' of github.com:MerlijnWajer/Simba