Implemention for issue 163.