Ensure context.id is cast to an integer