Corrected a bug with wlRegisterObject.