Fixes a bug while disposing graphics storage