Fix for adding new resource and closing modal