Fix for resource issue when debugging
Error when debugging