Minor fixes to get declare working