Ensure proper initialization of base values
Fix memory leak