Fixed a bug in the order of the arguments --> segfault
Fixed a second bug leading to te same result