bugfixes; changed identity matrix representation