bug fix: memory violation