[BUGFIX] Cast database result uid to int