ported #100 to stable5