Fix problem with multiple dom initiation