quick fixing for bugs found by tetsurom