Fixed indexing error in mul and added tests