Add fail-safe patch to comply to unit tests