quick hack to fix #5, want something better for this though