Matrix resolving correctly