Infinite loop in mapPrototypes

This pull solves the problem