fixed edit button bug

Fixed a rather stupid bug where the matrix edit button would always be
disabled.