fix hideous bugs