Fixed GL memory leaks.