Bug fix (memory issue)