Fixed memory leak - deallocate chamber memory properly