Fixed bug with static variables.