fixed stupid variable overriding