Fixed the Call_by_ref and compilation issues