Feature/more robust sequence handling