fixing handling of rec keyword