Implement and fix #18