Fix parameter validation for gs

Reviewed at https://codereview.appspot.com/26670044/