trying to fix null resource