Fixed release of graphics resources.