fix resource warning