fixing variable initialization