Fixed for version issues. (Hate you Mathworks.)