small fixes + matlab