bug in prepare fixed.