Issue 315

Correct memory issues and relative paths issues