hackish fix, but should work