Fixed bugs in loading of coupling matrices