set current resource even if operation fails