Should fix #1 and #7
Should fix #6