rectify merge from korn's branch