fixes to conditions etc