Fixed two bugs concerning the WSM creation.