Added more junits for issues #313,#291