matrix init fix