Added id argument validation to prevent script injection