temporary fix #26, further partial fix #24