Fix issue with client_id / user_id and fix intval()