Use appendMatrix instead of append.  See #490