Fixes bug on variable use