Fix for wrong scope
Can't handle null for id.