Fixed generic math dependency bug in makeres