Resolved the static variables problem