Minor fixes an tests