Fixes #3
Should fix #2 and #1 needs verification