Memory leak bug has been fixed. (Thanks to Hassan Hajji)