some ugly hack to make old scripts work