Fixed error with deterministic output