Fix for old version of Matlab