Fix resource warning and old references