Fix sequence number validation