fixed bug with symmetric matrix generator