fixed bug in IC setup code