Delegate first and last to to_a

`first` and `last` needs to be delegated to the array.

Also, change `last!` to `last` in order to avoid `StackLevelTooDeep` exception.