added tests #781