Findbug fixes and matrix handeling