Add when clause for ubuntu