fixed half completed code in op_free