a whole lotta bug fixes