bugfix memory issue