Fixed static vars not being pushed to stack