fixed a nasty completion bug thats been lurking for a wile