Squished bugs in algorithm