Fixes bugs related variable initialization.