Fix inconsistent behavior

@andrewminton found out that on some setup, `$form[0]` would not be
set. Somehow, the first item in the array was at key = 1

So this fix uses php's current method to get the firt item in the array.