Improvements on variable passing