static variables not initialized properly