fix infinite loop when using ace with polymer