ugly bug fix