Support callbacks in newResource