Minor change

value of variables m and n were not read correctly before.