fix bug where compile fails when  preference is defined