Fixed the error when element id's contain colons.

This will fix #145 I've created.